package mk.jug.academy.security;

import java.util.Collection;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

/**
 * Enhanced user model that plugs in the Spring security architecture.
 *
 * @author Ice.Penov
 */
@SuppressWarnings("serial")
public class EnhancedUser extends User {
	
	private String salt;

	public EnhancedUser(String username, String password, String salt, boolean enabled,
			boolean accountNonExpired, boolean credentialsNonExpired,
			boolean accountNonLocked,
			Collection<GrantedAuthority> authorities) {
		super(username, password, enabled, accountNonExpired, credentialsNonExpired,
				accountNonLocked, authorities);
		this.salt = salt; 
	}

	/**
	 * Returns the salt.
	 */
	public String getSalt() {
		return salt;
	}

	/**
	 * Setter for the salt.
	 */
	public void setSalt(String salt) {
		this.salt = salt;
	}
	
}